#ifndef BMP_FILE_OP_H
#define BMP_FILE_OP_H

#include "frame_top_funtion.h"

enum ebmp_rgb_type
{
	e_bmp_rgb = 0,
	e_bmp_rbg,
	e_bmp_grb,
	e_bmp_gbr,
	e_bmp_brg,
	e_bmp_bgr,
};

class bmp_file_op
{
public:
	bmp_file_op();
	virtual ~bmp_file_op();
public:
	BOOL bopen(const char* path);
	BOOL get_pixel(CPoint p, bmprgb &rgb, int type);
	BOOL get_pixel(CPoint p ,bmphsl &hsl, int type);
	BOOL bclose();
protected:
	void rgb_to_hsl(bmprgb rgb, bmphsl &hsl);

private:
	FILE *fp_;
};


#endif